// MonitoringUnitState.h: interface for the MonitoringUnitState class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MONITORINGUNITSTATE_H__EF269458_E74B_4307_BF4E_3A774FBC8763__INCLUDED_)
#define AFX_MONITORINGUNITSTATE_H__EF269458_E74B_4307_BF4E_3A774FBC8763__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class MonitoringUnitState
{
protected:
	MonitoringUnitState();
	virtual ~MonitoringUnitState();

public:
	//enum States {State0 = 0, State1, State2, Normal = 0x10, UnderLowerLimit, OverUpperLimit, Underflow = 0xfa, Overflow = 0xfb, Break = 0xfe, Halt = 0xff, UnknownState = 0x80};
	enum States {State0 = 0, State1, State2,
		Normal = 0x10, UnderLowerLimit, OverUpperLimit,
		OverBreakLimit, UnderRestLimit,
		UnknownState = 0x80, OverTiming,
		Underflow = 0xfa, Overflow = 0xfb, Fault = 0xfc, FZFault = 0xfd,
		Break = 0xfe, Halt = 0xff
	};
	// Convert name to state;
	static States FromName(LPCSTR lpszName);
	// Convert state to name;
	static LPCSTR GetName(States State);

private:
	static LPCSTR m_lpszName[];
};

#endif // !defined(AFX_MONITORINGUNITSTATE_H__EF269458_E74B_4307_BF4E_3A774FBC8763__INCLUDED_)
